import React from 'react'
import ReactDOM from 'react-dom';

import { createHistory, useBasename, createHashHistory } from 'history'
import { Router, Route ,useRouterHistory ,Redirect } from 'react-router'

import { Provider } from 'mobx-react';
import { RouterStore, syncHistoryWithStore } from 'mobx-react-router';

const routingStore = new RouterStore();

const browserHistory  = useRouterHistory(createHashHistory)({
    queryKey: '_key',
    basename: '/'
});

const history = syncHistoryWithStore(browserHistory, routingStore);
window.weaHistory = history;
import ElementIndie from './indie';
let stores = {
    // Key can be whatever you want
    routing:routingStore,
}
class Root extends React.Component {
    render() {
        return (
            <Provider ecId={`${this && this.props && this.props.ecId || ''}_Provider@gu9o0h`} {...stores}>
                <Router ecId={`${this && this.props && this.props.ecId || ''}_Router@6h9iji`} history={history}>
                    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@5btpvp`} path="main/portal/element" component={ElementIndie} />
                </Router>
            </Provider>
        )
    }
}

ReactDOM.render(<Root ecId={`${this && this.props && this.props.ecId || ''}_Root@i7fccz`} />,document.getElementById('container'));

